#################################################################################
#                                                                               #
#                                                                               #
#                              GraphicsDevPkg                                   #
#                         Makefile For dbmp Library                             #
#                                                                               #
#                                                                               #
#                                                                               #
#################################################################################


# COMPILER USED
CC= g++
AR= ar


# GENERAL DEFINITIONS
INCLUDE_DIR   = ../../../include
LIBRARY_DIR   = ../../../lib/linux
SRC_DBMP_DIR = ../../../src/dbmp
OBJ_DBMP_DIR = ./Debug
LIBRARY = libdbmp.a



# DBMP LIBRARY DEFINITIONS
SRC_DBMP = $(wildcard $(SRC_DBMP_DIR)/*.cpp)
OBJ_DBMP = $(SRC_DBMP:$(SRC_DBMP_DIR)/%.cpp=$(OBJ_DBMP_DIR)/%.o)
CFLAGS_DBMP = 
LFLAGS_DBMP = 



all: dbmp

dbmp: $(OBJ_DBMP) Makefile
	@echo 'dbmp: Creating dbmp Library ...'
	@$(AR) rcs $(LIBRARY_DIR)/$(LIBRARY) $(OBJ_DBMP)


$(OBJ_DBMP_DIR)/%.o: $(SRC_DBMP_DIR)/%.cpp Makefile
	@echo 'dbmp: generating object file "$@" ...'
	@$(CC) -I $(INCLUDE_DIR) -c $< -o $@



# CLEAN
clean: cleanup
	@rm -f $(OBJ_DBMP)
	@rm -f $(LIBRARY_DIR)/$(LIBRARY)
	@echo 'dbmp: Removing object Files'
	@echo 'dbmp: Removing Library'

#CLEANUP
cleanup:
	@rm -f $(SRC_DBMP_DIR)/*~
	@rm -f ./*~
	@echo 'dbmp: Removing *~ files'






